package com.project.collectAPI.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.servlet.Filter;

//@Configuration
public class MyFilterConfig {
    /**
     * 注册过滤器
     *
     * @return FilterRegistrationBean
     */
   /* @Bean
    public FilterRegistrationBean someFilterRegistration() {
        FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>();
        registration.setFilter(replaceStreamFilter());
        registration.addUrlPatterns("/*");
        registration.setName("replaceStreamFilter");
        return registration;
    }*/

    /**
     * 实例化StreamFilter
     *
     * @return Filter
     */
    /*@Bean(name = "replaceStreamFilter")
    public Filter replaceStreamFilter() {
        return new ReplaceStreamFilter();
    }*/
}
